package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by chengang on 2017/6/8.
 */

public class SaleMoneyApi extends BaseApi{
    SaleMoneyReq req;
    public SaleMoneyApi(String link_mobile) {
        req = new SaleMoneyReq(link_mobile);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).saleMoney(requestBody);
    }

    class SaleMoneyReq {
        public String link_mobile;

        public SaleMoneyReq(String link_mobile){
            this.link_mobile = link_mobile;
        }
    }
}
